90% information in website are static and updated by daily batch job. I am wondering I could use restful services for multi websites? If only 10% information is static, should I use it as well? Dose any body has used restful as data services for public website? My main website 's page view is round 10k/hour.
Thanks
Can you provide a little bit more information? I'm finding it hard to understand what you're asking here.
If you have any kind of structured data that you want to provide to external websites, REST is certainly a quick and easy way to do this.
If you know that the information changes only once a day, you could be caching the results of the REST GET requests on the external websites.
Related
I am building SaaS to help people build VOD websites and I am planning on adding single CDN to serve content for all the websites. The content on those websites should be publicly available, but I want to prevent other websites (not built with my service) from embedding videos hosted on my CDN. Another thing I care about is reducing network cost. What is the best way to achieve those things? What the video format should be, and what is the best protection method in my case?
P.S. I am on AWS
Thank you in advance!
I thought about CORS policies and signed URLs. Don't know about other method and which of the above is better in my case (more secure, easier to implement, cheaper etc.).
I am starting to learn developing web interfaces that can add and retrieve data via blockchain. The data is not in the form of cryptocurrency but rather in something like name and ID number.
I have also learnt about metamask, ganache, web3, truffle, javascript, html, css, node.js, solidity, smart contract and json...but I am not sure how to link all of them for adding and retrieving data via blockchain. I have done some googles and youtube, but unfortunately, I could only understand a few of them. Can you help me in explaining the interactions between blockchain and web interfaces to adding and retrieving data, and how to achieve it?
Web3 is used for all the purposes you've described above. Once you've retrieved the data, you can store it in a variable and use it in your frontend applications as well.
Here's a reference diagram : Link
If you are too lazy to read documentation, here are a series of good examples. They were very helpful tutorials for me.
I'm currently developing a web application, that relies heavily on mobile and desktop clients consulting the web server for information. This can be accomplished nicely making a RESTful API available to handle this. So my idea is to have an application acting as the "platform" which handles all the real business logic and database information behind the curtains.
My plan is to make the platform using symfony2 and OAuth 2.0 authentication mechanisms, combined with RESTful web services.
Now my real dilema comes on the website component. Ideally I would like to think of the website as yet another client that asks this REST platform for information, and completely separate it from the platform itself.
To make it a little bit more clear, let's say we are making a blog with this architecture, so one would have a "platform/backend" that provides a rest service to list articles, for example: /articles/5. This on the backend, and with symfony2/doctrine means that the app has an Article model class, and these can be requested from the DB. A simple controller queries for the Article number 5 and returns all the information in JSON format.
Now the website on this example, could just do the easy thing and also have an Article entity and just query the database directly, but I think it would be cleaner if it could just talk to the platform through it's REST api and use that information as a "backend" for the entities.
So the real question would be, is there anyway to support this kind of design using symfony2? Have entities rely on a REST api for CRUD operations? Or I'm just better off making the platform/website a single thing and share a "CoreBundle" with all the generic entities?
There is nothing in Symfony that prevents you from doing you want.
On the client side you could use Backbone.js or Spine.js.
Have a look at FosRestBundle, it makes your life much easier to create api:
https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/Resources/doc/index.md
I ran Page Speed Insight on my site and Leverage Browser Caching keeps coming up because of several calls to JS's from Facebook, Twitter, Google and LinkedIn. Also Firebug shows me these resources are increasing my load time.
I've set the Expire headers as described here, but still no change.
Is there something that can be done about optimizing load time & caching external resources from Google, Facebook or Twitter?
Here's my pagespeed report.
To answer the title question: No, there is no way of manipulating the HTTP headers for external resources, as long as you don’t want to loop them all through a proxy server of your own.
This is quite a concept idea. I would like to create a website that can be extend by different programmer a bit "a la facebook"
Let's me explain i want to develop a very simple core application that for example would store images and i want to develop or allow external developer to develop web app that would be able to act on the image i can take this example of an OS that would store files and you can "install" different program for example to view the files or edit.
How can i reproduce the model in the Web / cloud plateform using API ?
I hope this question make sense to any body.
Thank you by advance
Web Services. Try looking up REST and SOAP.
The Semantic Web is trying to solve this by publishing structured data with common ontologies.
See this example, describing the user's photos as RDF, using the FOAF ontology:
http://www.semanticoverflow.com/questions/201/describing-in-a-foaf-file-assets-of-a-user-photo-album-video-album-etc
The Semantic Overflow website is an excelent resource to find out more about the semantic web in general, and how creating webservices that use a common set of interfaces can allow a greater reach, because tools don't have to be specific to a website.