0% found this document useful (0 votes)
6 views

JT API Report

It explains API

Uploaded by

kaakaki777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

JT API Report

It explains API

Uploaded by

kaakaki777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

API FEASIBILITY REPORT: THE PIANO AND KEYBOARD EMPORIUM

Introduction

In a bid to expand its business model, the Piano and Keyboard Emporium seeks to develop a
new online subscription service for selling sheet music. In achieving this, they are faced with
the only significant question: which API architecture will facilitate this expansion? This
report provides an analysis of HTTP-based API options, evaluates them against the client's
criteria, and recommends the best approach for them to implement the new digital service.
Considering the goal of this report, the primary task remains: which HTTP-based API is best
suitable for the transitioning towards this online subscription service?

Evaluation of GraphQL and Go RESTful

GraphQL

Definition

GraphQL, introduced by Facebook in 2012 (Lee, 2015), stands at the forefront of modern
web technologies for crafting Web APIs. GraphQL is a query language and server-side
runtime for application programming interfaces (APIs) that prioritizes giving clients exactly
the data they request and no more (Red Hat, 2019). By design, its single point of entry
matches the trend of distributed systems and helps the accessing applications to have a
smooth communication as well as integrate data from various sources (Quiña-Mera et al.,
2023).

Critical Evaluation

GraphQL presents a compelling proposition for The Piano and Keyboard Emporium,
primarily due to its remarkable flexibility and efficiency. The ability to tailor queries to exact
data requirements minimizes unnecessary data transfer. This precision aligns seamlessly with
businesses experiencing evolving needs, such as The Piano and Keyboard Emporium's
transition to a sheet music subscription model. GraphQL acts as a unified gateway, enabling
efficient communication for the sheet music platform to access and modify data in the central
stock management system, sales databases, and other relevant repositories (Seabra et al.,
2019).
However, it's essential to acknowledge that GraphQL's strength in flexibility comes with a
trade-off – complexity. For a team without prior API development experience, navigating the
intricacies of GraphQL's query language and resolver functions may pose a learning curve.
This complexity could potentially lead to challenges in implementation and maintenance.

Go RESTful

Definition

Go RESTful, rooted in the Go programming language, represents a robust choice aligned


with current trends in web technology. Following the principles of Representational State
Transfer (REST), it embraces the simplicity and efficiency required by mainstream
businesses. RESTful APIs, a staple in contemporary web development, embody stateless
communication and standardized HTTP methods.

Critical Evaluation

Go RESTful aligns well with the client's existing expertise in Microsoft C# and PHP. Its
simplicity and adherence to REST principles make it a pragmatic choice for businesses
looking for a reliable and easy-to-implement solution. The Piano and Keyboard Emporium's
team can capitalize on their current skill set, ensuring a smoother transition. However,
RESTful APIs may face challenges in scenarios where the client desires more flexibility in
data retrieval, as they rely on fixed endpoints and may suffer from over-fetching of data.

Comparison

GraphQL Go RESTful
Flexibility Prioritizes dynamic queries, Adheres to fixed endpoints,
meeting the demand for providing simplicity but
tailored data retrieval. potentially limiting
flexibility.
Learning Curve Features a steeper learning Stands out for accessibility,
curve due to its unique making it advantageous for
query language. teams with diverse web
technology experience.
Integration Complexity Streamlines data integration, Offers straightforward
aligning with modern data integration but may face
architecture complexities. challenges with evolving
and dynamic data
requirements.

Significance of Web APIs

Web APIs play an important role for companies and bring in benefits such as component
decoupling, interoperability and modular development. The cycles are sped up, the code is
refactored and it allows to comply with microservices design for extensible systems. Web
APIs serve as innovation building blocks but let developers spend time improving services.
Systematic API Web adoption is critical in building faster and scalable web applications. The
decision on the GraphQL vs Go RESTful for The Piano and Keyboard Emporium should
correspond to these principles and be dynamic enough to fit into the modern business
environments.

Recommendation

Based on the research comparing GraphQL and Go RESTful, this report recommends
adopting a Go RESTful architecture, leveraging the Go programming language for the new
online sheet music subscription platform.

Several factors identified in the analysis drive this recommendation:

 Alignment with Existing Expertise

The analysis revealed the client team's existing proficiency in C# and PHP and experience
consuming external REST APIs. Go REST leverages these imperatives skills rather than
requiring a rewrite of competencies to learn an entirely new GraphQL paradigm. This
supports rapid productivity.

 Gradual Adoption Curve

GraphQL's steeper learning curve was recognized as a adoption barrier for a team lacking
previous internal API development expertise. Go RESTful provides a gradual onboarding
ramp towards service-oriented principles in line with staff capabilities.
 Flexibility Within Constraints

While GraphQL promises structural flexibility, the analysis deemed REST sufficient within
the project constraints - namely delivering core subscription capabilities. As the research
showed, REST allows incremental enhancements while avoiding complex holistic paradigm
shifts down the line.

Overall, when contextualized against the research insights into the client’s current landscape
and objectives, Go RESTful stands out as the lower-risk recommendation optimized for their
situational dynamics, constraints, and competencies. It strikes the right balance of simplicity
and pragmatism while keeping future growth paths accessible.

A software architecture design diagram and Tech Stack for Go RESTful

(Plisson, 2018)

Tech Stack

Language

- Go: Strongly typed, compiled language providing simplicity, scalability and high
performance. Integrated concurrency primitives suit web service development.

Frameworks & Libraries


- Gorilla Mux: Popular Go web framework for writing RESTful APIs and handling
routing/requests. Minimizes boilerplate code.
- GORM: ORM for simplifying interactions with PostgreSQL from Go for CRUD
operations. Handles connection pooling and schema migrations.
- JWT: JSON Web Token based user authentication between client and API for securing
access.

External APIs

- Stripe: Payment processing for subscription transactions and billing management.


- SendGrid: Cloud-based email delivery services for customer account lifecycle emails.
- CloudAMQP/AWS SQS: Hosted message queuing for background tasks like receipt
generation.

Hosting

- AWS EC2 / App Engine: Managed compute for running Go web services at scale.
- Cloudflare: Content delivery network, DDoS protection and caching.

Conclusion

This report did a comparison of GraphQL and Go RESTful APIs for the customer's digital
subscription platform, finally recommending Go RESTful due to compatibility with existent
functions. The proposed technology blueprint aligns with the suggested approach providing a
functional and adaptive resolution of the client's subscription vision.
REFERENCES

Lee, B. (2015). ‘GraphQL: A data query language’, Engineering at Meta, 14 September.


Available at: https://engineering.fb.com/2015/09/14/core-infra/graphql-a-data-query-
language/ (Accessed: 5 February 2024).

Plisson, S. (2018). ‘Clean Architecture for a Go REST API’, Medium, 25 September.


Available at: https://medium.com/@splisson/clean-architecture-for-a-go-rest-api-
8a2aea8a5650 (Accessed: 7 February 2024).

Quiña-Mera, A., Fernandez, P., García, J.M. and Ruiz-Cortés, A. (2023). ‘GraphQL: A
Systematic Mapping Study’, ACM Computing Surveys, 55(10), pp. 1-35.

Red Hat. (2019). ‘What is GraphQL?’, 8 January. Available at:


https://www.redhat.com/en/topics/api/what-is-graphql (Accessed: 5 February 2024).

Seabra, M., Nazário, M.F. and Pinto, G. (2019). ‘REST or GraphQL? A performance
comparative study’, Proceedings of the XIII Brazilian Symposium on Software Components,
Architectures, and Reuse, pp. 123-132.

You might also like