choice Which statement best describes a user story? A. A detailed Java implementation plan B. A capability expressed from a stakeholder perspective and its value C. A list of GitHub commits D. A UML class diagram
/ rewrite Evaluate this story using INVEST, then rewrite it: “As a developer, I want to implement a Java MQTT class, a REST controller, and a database so the system works.” Identify at least TWO problems.
For the Temperature system, write ONE Provide user story and ONE Consume user story. For each, specify: actor, value, input/output, and acceptance criterion.
choice Which item is most appropriate for a Sprint task board? A. “As a sensor operator, I want to see the latest temperature...” B. “Implement GET /temperature endpoint and test 200 response” C. “Reliable temperature monitoring” D. “Better architecture”
choice An interface between independently developed components should primarily specify: A. Their internal class hierarchy B. Their IDE and language C. Inputs, outputs, formats, and behavior D. Their private fields
A Java TemperatureService already calculates conversions. Design TWO adapters: • REST adapter accepting an HTTP request • MQTT adapter publishing a temperature event Draw components (UML a plus 😳) and indicate where the domain logic lives.
choice A REST contract should include which information? A. URL path, HTTP method, JSON shape, status/error behavior B. MQTT topic and QoS only C. Java method names only D. Docker image name only
design Design a REST API for temperature conversion. Provide: • one GET or POST route • example request • example JSON success response • one invalid-input response and status code
choice Which description best fits MQTT? A. Synchronous request/response only B. Publish/subscribe through a broker and topics C. Object storage D. Relational query language
An EEG sensor publishes JSON to `lab/affect` using MQTT. Create TWO independent subscribers. Label publisher, broker, topic, subscribers, and the contract they must agree on.
all Which are part of a useful MQTT integration contract? A. Topic name B. Payload schema C. QoS / delivery assumptions D. Private field names in the publisher E. Handling malformed messages
Trace Draw the complete flow for: Browser → GET /5100/temperature → ? → ? → JSON response Identify API Gateway, Lambda handler, the event input, and the returned response.
Java coding Write a minimal Java Lambda handler method that receives `Map<String,Object> event` and `Context context`, reads a numeric temperature value, and returns a JSON-serializable map with the converted value. State one assumption about the event structure.
Python coding Write a Python `lambda_handler(event, context)` that reads two numbers from an event and returns their sum in a JSON-serializable structure. Explain how you would test it locally.
choice Which pairing matches the course Lambda examples? A. Java → pytest; Python → JUnit B. Java → JUnit; Python → pytest C. Both require a deployed web server for unit tests D. Neither supports local tests
Arrange and explain the student Lambda workflow: clone repository • create branch • implement handler • run tests • push/PR • merge • GitHub Actions build/package/deploy • verify API route Which stages happen locally, on GitHub, and on AWS?
choice What is the role of GitHub Actions OIDC in the deployment workflow? A. Store temperature readings B. Authenticate GitHub workflow to AWS without a long-lived AWS key in repository secrets C. Replace API Gateway D. Convert Java to Python
choice A deployed Lambda fails, but local unit tests pass. Where should you first inspect runtime logs? A. Amazon S3 B. Amazon CloudWatch C. Maven Central D. GitHub Pages
choice When creating a DynamoDB table, what must be defined as part of the table key schema? A. Every possible non-key attribute B. Partition key (and optional sort key) C. All Java class names D. S3 bucket prefix
integration Your Lambda currently computes a temperature conversion. Describe the Java changes needed to persist each reading in DynamoDB. Name the Maven SDK module, client, request operation, and AWS permission needed.
choice What is `readings/abc123.json` in an S3 bucket? A. A traditional nested directory B. The full object key; `readings/` is a prefix C. A DynamoDB primary key definition D. An SNS subscription
design TemperatureLambda must store searchable reading metadata AND archive the original JSON payload. Choose DynamoDB and/or S3 for each responsibility. Draw the flow and explain how the same UUID links the records.
all Which statements match our S3 example? A. Block Public Access is appropriate for private Lambda data B. SSE-S3 encrypts objects at rest C. Bucket and Lambda must be publicly readable D. Region alignment with Lambda and DynamoDB simplifies setup E. Lambda runtime API alone supplies S3Client
Matching Match each statement to REST, MQTT, SNS, or SQS: 1. “I need an answer now.” 2. “Something happened.” (connected subscribers) 3. “Something happened in my cloud application.” 4. “This work needs to be done.”
Multiple choice Which distinction between SNS and SQS is most accurate? A. SNS stores files; SQS stores tables B. SNS fans out notifications; SQS holds work for consumers C. Both require synchronous HTTP clients D. SQS broadcasts every message to all competing workers
Reasoning Two Java plotting workers poll the SAME SQS queue. A message arrives. Should both workers normally process it? Explain competing consumers, acknowledgement/deletion, and what happens if processing fails.
Code an end-to-end Temperature system using at least FIVE of: REST, MQTT/AWS IoT Core, API Gateway, Lambda, DynamoDB, S3, SNS, SQS, CloudWatch. Draw a labeled architecture and explain which connections are synchronous and asynchronous.
Copyright. These slides may be used only as study material for CSC 5100 within the California State University system. They may not be distributed or used for any other purpose.