[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]
by Arooj Ahmed via Digital Information World
"Mr Branding" is a blog based on RSS for everything related to website branding and website design, it collects its posts from many sites in order to facilitate the updating to the latest technology.
To suggest any source, please contact me: Taha.baba@consultant.com
This post was originally published on the Stax website.
Building a web console for a product as complex as Stax presented a number of challenges. Our API-first, serverless platform offers a diverse range of features for enterprises who want to manage and optimize their AWS ecosystem.
With such a developer-focused foundation, we needed to provide customers with a performant, reactive web app, with an intuitive user-experience that didn’t hide the power and functionality of our API. Data access through our console also needed to be built to the same high standard of security and compliance as the rest of our product.
This post will cover what we set out to achieve when building the Stax Console, our experience building a serverless GraphQL API to power it, and the lessons we learned along the way.
We wanted to produce a solution that was serverless from the start, to match the architecture we use for the rest of the product. One of the biggest benefits we’ve seen from going all in on serverless architectures at Stax is uptime and reliability. Avoiding relying on a server that can become a single point of failure allows us to meet our Service-Level Agreement, and ensure customers can access the platform during peak load times. Using AWS Lambda means queries from our front-end scale out horizontally and there’s always enough compute resources to process requests.
Using serverless products also improves security during development, as services like AWS Lambda provide baked-in compliance and service levels out of the box. Allowing Amazon to handle upgrades and patching of the infrastructure that our code runs on allows us to focus on building software instead of managing hardware.
The minimal infrastructure overhead when going serverless has allowed our team to fully own the deployment and monitoring of our GraphQL API. For example, developers can add new Networks functionality using separate Lambda functions to those used to fetch account data, minimizing the blast radius from pushing a new change to production.
The first iteration of our Console had a fairly traditional web architecture. A React single-page application (SPA) called the Stax REST API directly, which is a serverless solution using AWS API Gateway and AWS Lambda in front of a relational database. AWS Cognito handles user authentication and sign-on for both the Console and REST API.
We ran into a few technical issues with this approach:
It also became apparent that as Stax grew as a product, the Console needed to integrate with other back-end services than our REST API, such as Cost and Compliance data for accounts and our Customer Support Case service. Interfacing with multiple APIs and protocols, all with differing authentication mechanisms, led us to consider a Back End for Front End pattern with a single GraphQL API.
The architecture centers on a GraphQL API layer that acts as a proxy between our front-end and back-end services. GraphQL is a query language for APIs; it allows developers to define the types of data in a system (the schema), and wire up functions to fetch data from different sources (resolvers). Relationships between data can be expanded in a single GraphQL query. For example, a single request can resolve a Stax Workload and the user that deployed it in one go.
A key reason GraphQL suited our needs is that data can be fetched from any source by a resolver and be presented to a front end as a single interface. This means that as Stax grows, we can refactor and optimize back-end services with minimal impact to our front-end developers and customers. Authentication is also massively simplified. The front-end authenticates to our GraphQL API in one place, which handles connections to various REST and GraphQL APIs and event sources behind the scenes.
At Stax, we’re closely partnered with AWS, and try to use native AWS solutions where possible as part of our development philosophy. We opted to use AWS AppSync, a fully managed serverless GraphQL implementation as the core of our service.
AWS AppSync implements the main GraphQL directives, including GraphQL Subscriptions that manage WebSocket connections between clients and your GraphQL API. AWS Lambda fetches and transforms data in GraphQL resolver functions, AWS DynamoDB is used for serverless data stores, and AWS EventBridge triggers Lambda functions in response to system events.

Continue reading How We Built a Serverless Web App for the Stax Console on SitePoint.
To make sound financial decisions, you need a reliable, up-to-the-minute source of real-time stock market data.
You want the same source of data used by Microsoft, Amazon, Credit Suisse, and Uber.
The good news is you don't have to be a major player to have this data in real time.
Whether you're an individual, small business, financial advisor, or developer, the marketstack API gives you access to real-time, intraday, and historical stock data from 72 global stock exchanges, including Nasdaq, the New York Stock Exchange, and the London Stock Exchange.
You too can now deliver real-time, intraday, historical stock, or end-of-day market data to your website and to your clients and create satisfying user experiences.
It's simple and cost-effective: let me introduce you to marketstack.

marketstack is a popular, easy-to-use REST API interface that delivers real-time, intraday, and historical stock market data.
The API is powered by cutting-edge technology and a scalable cloud infrastructure capable of handling several million API requests per hour with ease.
You can search from 125,000+ worldwide stock tickers, collected from 72 global exchanges, including Nasdaq and the NYSE.
Using the marketstack REST API, you will be able to obtain end-of-day and intraday data, as well as historical market data for the last 30 years.
With the marketstack API, you can:
marketstack uses the lightweight JSON format, and HTTP GET for all the requests. API queries are easy to create and to interpret.
The API integrates with widely used programming languages and platforms: PHP, Python, jQuery, Node, Go, and Ruby.
The marketstack API can scale with your information and data demands. It can easily handle spikes and increases in your daily queries.
Client data is protected by a layer of heavy security. Each bit and byte sent to and from the marketstack API is encrypted using industry-standard 256-bit HTTPS encryption.
Stock market data provided by the marketstack API is licensed and sourced from multiple high-authority market data providers around the world.
Trusted by 30,000 companies and 75 universities.
The marketstack API comes with extensive and detailed documentation.
The marketstack API is built upon a RESTful and easy-to-understand request and response structure.
Here is an example of the information returned from a marketstack API query.

It's very easy to get set up and start using marketstack. This short tutorial will show you how.
To get started, first sign up for a free account at marketstack. Once you've registered, you'll be taken to the marketstack API quick start screen. From here, you can get your API key and try some example API queries.

Now you can perform a request. Using your API key and the example queries shown in the quick start guide, you can look up stock prices and other information. For example, let's perform a single request for Apple stock.
The quick start guide shows the following format for the query.

Click the example to try the request, or enter it into your address bar:
http://api.marketstack.com/v1/eod?access_key=YOUR_ACCESS_KEY&symbols=AAPL
Be sure to copy your access key into this URL to try it. If your API request was successful, the marketstack API will return pagination information as well as a data object, which contains a separate sub-object for each requested date/time and symbol.

Note that requests you make on the free plan are not encrypted, so you must use the HTTP protocol for free requests. If you try to use HTTPS, you will get the message that "Your current subscription plan does not support HTTPS encryption". If HTTPS is important to you, then you'll need to go with a paid plan.
You can learn more from the official marketstack documentation, including code examples for JavaScript, PHP, Python, and more.

marketstack has several market data subscription plans.
Free: You get 1,000 data requests per month without paying anything. This applies for all supported stock tickers and exchanges. It does not offer intraday data, and you are restricted to one year of historical data. No credit card is needed to register.
Who is this plan best for? It's best for beginners wanting to test the waters and see how marketstack works.
Basic: gets you 10,000 requests per month, support for intraday data, access to ten-year historical data, HTTPS encryption, a commercial license, and more. At the time of writing, this plan is $9.99 per month, or $7.99 if billed yearly.
Who is this plan best for? For those who have seen how marketstack works and want to get serious using it.
Professional (Most Popular): With this plan, you get real-time updates, full historical data, up to 100,000 requests per month, and technical support.
Business: This plan gives you all the tools you will ever need, for up to 500,000 monthly requests, real-time updates, and direct support.
Enterprise: If none of the other plans are adequate, you can get custom pricing that is tailored to your needs.
marketstack is trusted by 30,000 companies and 75 universities. This is a big mark of approval. The interfaces for requests and responses are easy to use, and there is detailed documentation that explains all the API parameters.
Try it out today with a free API key!